def extract_bookmarks( node, bookmarks):
    if 'name' in node and 'url' in node:
        bookmarks[node['name']] = node['url']
    if 'children' in node:
        for child in node['children']:
            extract_bookmarks(child,bookmarks)
